"""获取登录成功的令牌，拼接到请求头"""
import requests


def get_header():
    url = "http://ihrm-java.itheima.net/api/sys/login"
    data={"mobile": "13800000002", "password": "929itheima.CN032@.20250516"}
    resp=requests.post(url=url,json=data)


    token=resp.json().get("data")

    header = {"Content-Type": "application/json",
              "Authorization":"Bearer "+token}

    return header

if __name__ == '__main__':
    print(get_header())
